import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import StudentView from '../views/StudentView.vue'
import student1 from '../views/student1.vue'
import student2 from '../views/student2.vue'
import CampusBinhai from '../views/CampusBinhai.vue'
import CampusChashan from '../views/CampusChashan.vue'
import CampusYueqing from '../views/CampusYueqing.vue'
import StudentSystem from '../views/StudentSystem.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/student',
    name: 'student',
    component: StudentView,
    children:[
      {
        path:'student1',
        component:student1
      },
      {
        path:'student2',
        component:student2
      }     
    ]
  },
  {
    path: '/CampusBinhai',
    name: 'CampusBinhai',
    component: CampusBinhai,
  },
  {
    path: '/CampusChashan',
    name: 'CampusChashan',
    component: CampusChashan,
  },
  {
    path: '/CampusYueqing',
    name: 'CampusYueqing',
    component: CampusYueqing,
  },
  {
    path: '/StudentSystem',
    name: 'StudentSystem',
    component: StudentSystem,
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    }
  }
]

const router = new VueRouter({
  routes
})

export default router